var arr = "hello world \n1 hello moyu \n2 hello momo \n3 hi";

var pattern = /^\d\s\w+/gm;
console.log(arr);
var result = null;
while(result = pattern.exec(arr)){
    console.log(result);
}
